<template>
  <div class="home">
    <el-row :gutter="20">
      <el-col :span="24">
        <h1 class="welcome-title">欢迎来到新闻网站</h1>
        <p class="welcome-text">在这里，您可以浏览最新的新闻资讯，发表评论，与其他人互动。</p>
      </el-col>
    </el-row>

    <el-row :gutter="20" class="feature-section">
      <el-col :span="8">
        <el-card class="feature-card">
          <template #header>
            <div class="card-header">
              <el-icon><Document /></el-icon>
              <span>最新资讯</span>
            </div>
          </template>
          <div class="card-content">
            浏览最新的新闻文章，了解时事动态
          </div>
        </el-card>
      </el-col>

      <el-col :span="8">
        <el-card class="feature-card">
          <template #header>
            <div class="card-header">
              <el-icon><ChatDotRound /></el-icon>
              <span>互动评论</span>
            </div>
          </template>
          <div class="card-content">
            参与讨论，分享您的观点和想法
          </div>
        </el-card>
      </el-col>

      <el-col :span="8">
        <el-card class="feature-card">
          <template #header>
            <div class="card-header">
              <el-icon><Star /></el-icon>
              <span>个性化推荐</span>
            </div>
          </template>
          <div class="card-content">
            根据您的兴趣，获取个性化的新闻推荐
          </div>
        </el-card>
      </el-col>
    </el-row>

    <el-row class="cta-section">
      <el-col :span="24">
        <el-button type="primary" size="large" @click="$router.push('/news')">
          开始浏览新闻
        </el-button>
      </el-col>
    </el-row>
  </div>
</template>

<script setup>
import { Document, ChatDotRound, Star } from '@element-plus/icons-vue'
</script>

<style scoped>
.home {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.welcome-title {
  text-align: center;
  font-size: 2.5em;
  color: #303133;
  margin-bottom: 20px;
}

.welcome-text {
  text-align: center;
  font-size: 1.2em;
  color: #606266;
  margin-bottom: 40px;
}

.feature-section {
  margin-bottom: 40px;
}

.feature-card {
  height: 100%;
  transition: transform 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2em;
  color: #409EFF;
}

.card-content {
  font-size: 1.1em;
  color: #606266;
  line-height: 1.6;
}

.cta-section {
  text-align: center;
  margin-top: 40px;
}

.el-button {
  padding: 15px 30px;
  font-size: 1.2em;
}
</style> 